<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>麦知网——学问有余，乐为人师</title>

<!-- Bootstrap core CSS -->
<link href="../../../../css/bootstrap.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="../../../../css/non-responsive.css" rel="stylesheet">
<link href="../../../../css/font-awesome.min.css" rel="stylesheet">

    <!-- Just for debugging purposes. Don't actually copy this line! -->
    <!--[if lt IE 9]><script src="../../../../docs-assets/js/ie8-responsive-file-warning.js"></script><![endif]-->

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="http://cdn.bootcss.com/html5shiv/3.7.0/html5shiv.min.js"></script>
      <script src="http://cdn.bootcss.com/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
<link href="../../../../css/play.css" rel="stylesheet">    
 
</head>
<body>
	{% include 'public/common/header.html' %}
<div class="container" style="margin-top:45px">
	<div class="row">
		<div class="col-xs-12">
			<div>
				<div class="pull-left">
					<div class="pull-left" style="margin-top:55px">
						<ol class="breadcrumb play_breadcrumb">
						  <li><a href="{% url 'courses:types' %}">课程系列</a></li>
						  <li><a href="{% url 'courses:tinytypes' types.id %}">{{types.name}}</a></li>
						  <li><a href="{% url 'courses:courselist' tiny.id %}">{{tiny.name}}</a></li>
						  <li><a href="{% url 'courses:thecourse' course.id %}">{{course.name}}</a></li>
						  <li class="active">{{lession.name}}</li>
						</ol>
					</div>
					<div class="pull-left play_share" style="margin-top:55px">
						分享到：XXXXXXX
					</div>
					<div class="clearfix"></div>
				</div>
				<div class="pull-right">
					<div class="play_teacher">
						<div class="pull-left">
							<img src="{{info.domain}}/{{info.img}}" class="img-circle play_tea_img" width="100%"/>
						</div>
						<div class="pull-left play_tea_intro">
							<div>
								<div class="pull-left play_tea_intro11"><a href="{% url 'users:home' info.user_id %}" title="{{info.user_name}}"><b>{{info.user_name}}</b></a>{% ifequal purview '1' %}<i class="icon-check" title="认证用户" style="margin-left:7px"></i>{% endifequal %}{% ifequal purview '2' %}<i class="icon-home" title="企业用户" style="margin-left:7px"></i>{% endifequal %}</div>
								<div class="pull-left">
								{% ifequal focus '0' %}<span class="focus"><button id="add{{course.teacher_id}}" type="button" onclick="add({{course.teacher_id}})" class="btn btn-info btn-xs">+ 关注</button><button id="abord{{course.teacher_id}}" style="display:none" type="button" onclick="add({{course.teacher_id}})" class="btn btn-danger btn-xs">取消关注</button></span></div>
								{% endifequal %}
								{% ifequal focus '1' %}
								<span class="focus"><button id="abord{{course.teacher_id}}" type="button" style="display:none" onclick="add({{course.teacher_id}})" class="btn btn-info btn-xs">+ 关注</button><button id="add{{course.teacher_id}}"  type="button" onclick="add({{course.teacher_id}})" class="btn btn-danger btn-xs">取消关注</button></span>
								{% endifequal %}
								</div>
							</div>
							<div class="play_tea_intro2"><i>
								{{info.sign}}
							</i></div>
						</div>
						<div class="clearfix"></div>
					</div>
				</div>
				<div class="clearfix"></div>
			</div>
			<div>
				<div id="video" style="position:relative;z-index: 9999;height:400px;width:600px;float: left;"><div id="a1"></div></div>
				<script type="text/javascript" src="../../../../player/ckplayer/ckplayer.js" charset="utf-8"></script>
				<script type="text/javascript">
					var flashvars={
						f:'http://movie.ks.js.cn/flv/other/1_0.flv',
						c:0,
						b:1,
						//l:'http://www.ckplayer.com/down/adv6.1_1.swf|http://www.ckplayer.com/down/adv6.1_2.swf',//前置广告，swf/图片/视频，多个用竖线隔开，图片和视频要加链接地址
						r:'',
						};
					var params={bgcolor:'#FFF',allowFullScreen:true,allowScriptAccess:'always'};
					CKobject.embedSWF('../../../../player/ckplayer/ckplayer.swf','a1','ckplayer_a1','600','400',flashvars,params);
					/*
					CKobject.embedSWF(播放器路径,容器id,播放器id/name,播放器宽,播放器高,flashvars的值,其它定义也可省略);
					下面三行是调用html5播放器用到的
					*/
					var video=['http://movie.ks.js.cn/flv/other/1_0.mp4->video/mp4','http://www.ckplayer.com/webm/0.webm->video/webm','http://www.ckplayer.com/webm/0.ogv->video/ogg'];
					var support=['iPad','iPhone','ios','android+false','msie10+false'];
					CKobject.embedHTML5('video','ckplayer_a1',600,400,video,flashvars,support);
					var box = new LightBox();
				  </script>
				  <div>
					  <div class="pull-right play_text">
							<div>
								<div><b>本课时文档</b></div>
								<div class="play_text2"><a href=""><b>查看</b></a>&nbsp;&nbsp;或&nbsp;&nbsp;<a href=""><b>下载</b></a></div>
							</div>
							
					  </div>
					  <div class="clearfix"></div>
				   </div>
				   
			</div>
			<div class="play_Attachment">
					<!--<div class="pull-right play_text">
						<div>
							<div><b>本课时文档</b></div>
							<div class="play_text2"><a href=""><b>查看</b></a>&nbsp;&nbsp;或&nbsp;&nbsp;<a href=""><b>下载</b></a></div>
						</div>
						<div>
							FDSAFDAS
						</div>
					</div>-->

				{% for j in alllessions %}
					{% ifequal j.0 1 %}
						{{i.2}}
					{% else %}
						{{i.2}}
					{% endifequal %}
				{% endfor %}
				<div class="pull-left play_introduce">
					<div>
						<div class="pull-left">我本系列的学习进度：</div>
						<div class="pull-left progress progress-striped play_progress">
						  <div class="progress-bar"  role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%">
						    <span class="sr-only">45% Complete</span>
						  </div>
						</div>
						<div class="pull-right">
							<div class="play_message"><a id="play_message" href="javascript:void(0)" data-toggle="popover" data-placement="bottom" data-content="{% for i in alllessions %}<div style='text-align:center;width:180px;'>{% ifequal i.0 1 %}<!-- 如果是已经学习的课程 --><div class='pull-left' style='padding:2px 5px 2px 5px;background-color:#F9BA00;margin:3px 3px 3px 3px;'>{{i.1}}</div><!-- 如果是已经学习的课程  结束处 -->{% else %}<!-- 如果是一个未学习的课程  开始处 --><div class='pull-left' style='padding:2px 5px 2px 5px;background-color:#A6DDF2;margin:3px 3px 3px 3px;'>{{i.1}}</div><!-- 如果是未学习的课程  结束处 -->{% endifequal %}<div class='clearfix'></div></div>{% endfor %}" data-original-title title><b>课程详细</b></a></div>
						</div>
						<div class="clearfix"></div>
					</div>
				</div>
				<div class="clearfix"></div>
			</div>
		</div>
	</div>
</div>
	
	
	
	
	<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
	<script src="../../../../js/jquery.min.js"></script>
	
	<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
	<script src="../../../../js/bootstrap.js"></script>
	<script type="text/javascript">
		$('#play_message').popover({html:true});
		var xmlHttp; 

		function createXMLRequest(){
			if(window.ActiveXObject){
				xmlHttp=new ActiveXObject("Microsoft.XMLHttp");
			} else if(window.XMLHttpRequest){
				xmlHttp=new XMLHttpRequest();
			}
		}

		function add(u_id){   
			createXMLRequest();                       
			var url="/users/add/?id="+u_id;
			xmlHttp.open("GET",url);
			var this_btn=document.getElementById('add'+u_id)
			var that_btn=document.getElementById('abord'+u_id)
			xmlHttp.onreadystatechange=function(){
				if(xmlHttp.readyState==4 && xmlHttp.status==200){
					if(xmlHttp.responseText==1){
						this_btn.style.display='none';
						that_btn.style.display='inline';
					}
				}
			};
			xmlHttp.send(); 
		}

	</script>
</body>
</html>